﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Numerics;

namespace ArgusLight.Fractals2D
{
	public class MandelbrotFractal : ComplexFractal
	{
		public MandelbrotFractal(int Width, int Height, int Iterations, ComplexFractalColoring.Coloring coloring)
			: base(Width, Height, Iterations, coloring)
		{
			Size s = new Size(3.2, 2.4);
			s = s.ChangeRatio(this.GetRatio(), System.Windows.ExtensionMethods.ChangeRatioOptions.IncreaseAreaSize);
			this.para.ShownArea = s.ToRectangle(new Point(-0.75, 0), System.Windows.ExtensionMethods.RectOption.Center);
		}

		public MandelbrotFractal()
			: base()
		{
		}

		protected override Complex IterationFormula(Complex c, Complex z)
		{
			return Complex.Pow(z, 2) + c;
		}
	}
}
